
export async function ASR(req,res) {
    try {
        
        fetch('https://openai.qiniu.com/v1/voice/asr', {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json',
                'Authorization': `Bearer ${process.env.OPENAI_API_KEY}`
            },
            body: JSON.stringify({
                model: "asr",
                audio: {
                    format: "asr",
                    url: "http://idh.qnaigc.com/voicetest.mp3"
                }
            })
        })
        .then(response => response.json())
        .then(data => {
            console.log(data);
        })
        .catch(error => {
            console.error('Error:', error);
        });
        
    } catch (error) {
        
    }
}